package gov.kqqzyyy.monkey.clinicscreen.mytools;

import android.app.Application;
import android.content.Context;
import android.util.ArrayMap;

import java.util.List;


/**
 * Created by Monkey on 2017/12/20.
 * 自定义Application，存储全局变量
 */

public class MyApplication extends Application {

    private ArrayMap<String, String> deviceInfos;// 用来存储设备信息和异常信息
    private long deltaTime = 0;//与服务器时间差
    public static Context applicationContext;
    private List<String> warnList;

    private boolean isHisense = false;

    @Override
    public void onCreate() {
        super.onCreate();
//        CrashHandler.getInstance().init(this);
//        Fresco.initialize(this);
//        KLog.init(BuildConfig.LOG_DEBUG);
        applicationContext = this;
    }

    public boolean isHisense() {
        return isHisense;
    }

    public void setHisense(boolean hisense) {
        isHisense = hisense;
    }

    public List<String> getWarnList() {
        return warnList;
    }

    public void setWarnList(List<String> warnList) {
        this.warnList = warnList;
    }

    public long getDeltaTime() {
        return deltaTime;
    }

    public void setDeltaTime(long deltaTime) {
        this.deltaTime = deltaTime;
    }

    public ArrayMap<String, String> getDeviceInfos() {
        if (deviceInfos == null) {
            return new ArrayMap<>();
        }
        return deviceInfos;
    }

    public void setDeviceInfos(ArrayMap<String, String> deviceInfos) {
        this.deviceInfos = deviceInfos;
    }

}
